package org.yate.oa.dao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.yate.oa.dao.IBaseMapperDao;
import org.yate.oa.model.UserEntity;
import org.yate.oa.utils.Pagination;

@Repository(value = "userMapper")
@CacheNamespace(size = 512)
public interface UserMapper extends IBaseMapperDao<UserEntity, Integer> {
	UserEntity getEntitiesByURId(@Param(value = "id") Long urId);

	Integer addUser(final UserEntity u);

	List<UserEntity> getEntitiesByOrdId(Pagination<UserEntity> page, @Param(value = "orderField") final String orderField, @Param(value = "orderMode") final String orderMode,
			@Param(value = "where") String... strings);

	List<UserEntity> getAllUsers();
	
	List<UserEntity> getAllUsersByOrgId(List<Integer> ids);

	void updatePassword(final UserEntity u);
	
	UserEntity getEntityByUserName(@Param(value = "where") String... strings);
	
	List<UserEntity> getEntityBy(final UserEntity u);
}
